As a color image encoding method for encoding multi-valued color image data by dividing the color data into blocks, and generating code data for each block which can insure a high quality decoded image even for a high space frequency color image other than natural images, the fixed length GBTC (Generalized Block Truncation Coding) type of encoding system is known.
FIG. 15 is an explanatory view illustrating the fixed length GBTC type of encoding system. Initially, an image is divided into a number of 4.times.4 pixel blocks. Herein assuming that the intra-block pixel value is xij (i, j=1.about.4) the average value in a block LA, the gradation width index LD, the maximum value L.sub.max, the minimum value L.sub.min, the quantized value .phi.ij (where i equals a value 1 to 4 and j equals a value from 1 to 4), and the decoding value yij ([i, j=1.about.4]), the encoding sequence is as shown in FIG. 16.
As shown in FIG. 16 illustrating the decoding sequence, at first the maximum and the minimum pixel values in a block are obtained, average values Q1 and Q4 of the pixel values belonging to the top and bottom areas of four areas obtained by dividing the difference between the maximum value and the minimum value respectively are computed. An average value of said Q1 and Q4 and a difference between said Q1 and Q4 are defined as the average value LA and the tone width index LD respectively.
Then each pixel value in a block is divided into four portions according to the average value LA and the gradation width index LD, and each portion is quantized to a two-bit quantized value. The code data comprises six bytes. As shown in FIG. 17, the first byte is an average value, the second byte is a gradation width index, and the third to sixth bytes are quantized values.
As for the decoding sequence, as shown in FIG. 18, four types of quantized values are decoded according to the average value LA, and the gradation width index LD. FIG. 19 shows an example where this fixed length GBTC type of code is applied on an image memory circuit for a color printer. With this encoding system, it becomes possible to compress artificial images, such as letters and CG (Computer Graphics) which are substantially degraded when compressed with the JPEG system, without being degraded largely.
However, in the conventional methods as described above, code data for a block comprises six bytes, so that the compression ratio is 3/8, which means that effective compression can not be realized. Especially in case of artificial images such as letters and computer graphics, there are many blocks each comprising one or two pixel(s), and also unnecessary data is encoded, which makes it impossible to efficiently encode image data.